// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_SALES_FEE
// * CreateDate    : 2011/11/16 17:16:07
// * Creater       : CodeSmith
// * LastChangeDate: 2011/11/16 17:16:07
// * LastChanger   : 2011/11/16 17:16:07
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class SalesFeeEntity : EntityBase
    {
        public SalesFeeTable TableSchema
        {
            get
            {
                return SalesFeeTable.Current;
            }
		}
		
		public SalesFeeEntity()
        {

        }
		
		public SalesFeeEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.SalesFeeId = Convert.ToString(CommonFunctions.ToObject(dr["SALES_FEE_ID"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.RelatedId = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ID"]));
			this.FeeCode = Convert.ToString(CommonFunctions.ToObject(dr["FEE_CODE"]));
			this.FeeType = Convert.ToString(CommonFunctions.ToObject(dr["FEE_TYPE"]));
			this.PersonId = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_ID"]));
			this.FeeStartDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["FEE_START_DATE"]));
			this.FeeEndDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["FEE_END_DATE"]));
			this.OrderAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["ORDER_AMOUNT"]));
			this.SalesAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["SALES_AMOUNT"]));
			this.AttachedFile = Convert.ToString(CommonFunctions.ToObject(dr["ATTACHED_FILE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.ApprovedAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["APPROVED_AMOUNT"]));
			this.ApproveRemark = Convert.ToString(CommonFunctions.ToObject(dr["APPROVE_REMARK"]));
			this.CeoApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["CEO_APPROVED_BY"]));
			this.CeoApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CEO_APPROVED_DATE"]));
			this.CeoApprovedRemark = Convert.ToString(CommonFunctions.ToObject(dr["CEO_APPROVED_REMARK"]));
			this.CeoApprovedAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["CEO_APPROVED_AMOUNT"]));
			this.UseAdvanceAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["USE_ADVANCE_AMOUNT"]));
			this.CeoApprovedSalesFee = Convert.ToDecimal(CommonFunctions.ToObject(dr["CEO_APPROVED_SALES_FEE"]));
			this.ExpenseAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["EXPENSE_AMOUNT"]));
			this.FinPaidDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["FIN_PAID_DATE"]));
			this.FinPaymentBy = Convert.ToString(CommonFunctions.ToObject(dr["FIN_PAYMENT_BY"]));
			this.FinPaidAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["FIN_PAID_AMOUNT"]));
            this.FinPaymentType = Convert.ToString(CommonFunctions.ToObject(dr["FIN_PAYMENT_TYPE"]));
            this.FinOrderType = Convert.ToString(CommonFunctions.ToObject(dr["FIN_ORDER_TYPE"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }
		
		public SalesFeeEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.SalesFeeId = Convert.ToString(CommonFunctions.ToObject(dr["SALES_FEE_ID"]));
			this.CustomerId = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_ID"]));
			this.RelatedId = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ID"]));
			this.FeeCode = Convert.ToString(CommonFunctions.ToObject(dr["FEE_CODE"]));
			this.FeeType = Convert.ToString(CommonFunctions.ToObject(dr["FEE_TYPE"]));
			this.PersonId = Convert.ToString(CommonFunctions.ToObject(dr["PERSON_ID"]));
			this.FeeStartDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["FEE_START_DATE"]));
			this.FeeEndDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["FEE_END_DATE"]));
			this.OrderAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["ORDER_AMOUNT"]));
			this.SalesAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["SALES_AMOUNT"]));
			this.AttachedFile = Convert.ToString(CommonFunctions.ToObject(dr["ATTACHED_FILE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.ApprovedAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["APPROVED_AMOUNT"]));
			this.ApproveRemark = Convert.ToString(CommonFunctions.ToObject(dr["APPROVE_REMARK"]));
			this.CeoApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["CEO_APPROVED_BY"]));
			this.CeoApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CEO_APPROVED_DATE"]));
			this.CeoApprovedRemark = Convert.ToString(CommonFunctions.ToObject(dr["CEO_APPROVED_REMARK"]));
			this.CeoApprovedAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["CEO_APPROVED_AMOUNT"]));
			this.UseAdvanceAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["USE_ADVANCE_AMOUNT"]));
			this.CeoApprovedSalesFee = Convert.ToDecimal(CommonFunctions.ToObject(dr["CEO_APPROVED_SALES_FEE"]));
			this.ExpenseAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["EXPENSE_AMOUNT"]));
			this.FinPaidDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["FIN_PAID_DATE"]));
			this.FinPaymentBy = Convert.ToString(CommonFunctions.ToObject(dr["FIN_PAYMENT_BY"]));
			this.FinPaidAmount = Convert.ToDecimal(CommonFunctions.ToObject(dr["FIN_PAID_AMOUNT"]));
            this.FinPaymentType = Convert.ToString(CommonFunctions.ToObject(dr["FIN_PAYMENT_TYPE"]));
            this.FinOrderType = Convert.ToString(CommonFunctions.ToObject(dr["FIN_ORDER_TYPE"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
			this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return SalesFeeTable.Current;
            }
        }
		
		#region Perporty List
        public string SalesFeeId
        {
            get { return Convert.ToString(GetData(SalesFeeTable.C_SALES_FEE_ID)); }
            set { SetData(SalesFeeTable.C_SALES_FEE_ID, value); }
        }
		
        public string CustomerId
        {
            get { return Convert.ToString(GetData(SalesFeeTable.C_CUSTOMER_ID)); }
            set { SetData(SalesFeeTable.C_CUSTOMER_ID, value); }
        }
		
        public string RelatedId
        {
            get { return Convert.ToString(GetData(SalesFeeTable.C_RELATED_ID)); }
            set { SetData(SalesFeeTable.C_RELATED_ID, value); }
        }
		
        public string FeeCode
        {
            get { return Convert.ToString(GetData(SalesFeeTable.C_FEE_CODE)); }
            set { SetData(SalesFeeTable.C_FEE_CODE, value); }
        }
		
        public string FeeType
        {
            get { return Convert.ToString(GetData(SalesFeeTable.C_FEE_TYPE)); }
            set { SetData(SalesFeeTable.C_FEE_TYPE, value); }
        }
		
        public string PersonId
        {
            get { return Convert.ToString(GetData(SalesFeeTable.C_PERSON_ID)); }
            set { SetData(SalesFeeTable.C_PERSON_ID, value); }
        }
		
        public DateTime FeeStartDate
        {
            get { return Convert.ToDateTime(GetData(SalesFeeTable.C_FEE_START_DATE)); }
            set { SetData(SalesFeeTable.C_FEE_START_DATE, value); }
        }
		
        public DateTime FeeEndDate
        {
            get { return Convert.ToDateTime(GetData(SalesFeeTable.C_FEE_END_DATE)); }
            set { SetData(SalesFeeTable.C_FEE_END_DATE, value); }
        }
		
        public decimal OrderAmount
        {
            get { return Convert.ToDecimal(GetData(SalesFeeTable.C_ORDER_AMOUNT)); }
            set { SetData(SalesFeeTable.C_ORDER_AMOUNT, value); }
        }
		
        public decimal SalesAmount
        {
            get { return Convert.ToDecimal(GetData(SalesFeeTable.C_SALES_AMOUNT)); }
            set { SetData(SalesFeeTable.C_SALES_AMOUNT, value); }
        }
		
        public string AttachedFile
        {
            get { return Convert.ToString(GetData(SalesFeeTable.C_ATTACHED_FILE)); }
            set { SetData(SalesFeeTable.C_ATTACHED_FILE, value); }
        }
		
        public string ApprovedBy
        {
            get { return Convert.ToString(GetData(SalesFeeTable.C_APPROVED_BY)); }
            set { SetData(SalesFeeTable.C_APPROVED_BY, value); }
        }
		
        public DateTime ApprovedDate
        {
            get { return Convert.ToDateTime(GetData(SalesFeeTable.C_APPROVED_DATE)); }
            set { SetData(SalesFeeTable.C_APPROVED_DATE, value); }
        }
		
        public decimal ApprovedAmount
        {
            get { return Convert.ToDecimal(GetData(SalesFeeTable.C_APPROVED_AMOUNT)); }
            set { SetData(SalesFeeTable.C_APPROVED_AMOUNT, value); }
        }
		
        public string ApproveRemark
        {
            get { return Convert.ToString(GetData(SalesFeeTable.C_APPROVE_REMARK)); }
            set { SetData(SalesFeeTable.C_APPROVE_REMARK, value); }
        }
		
        public string CeoApprovedBy
        {
            get { return Convert.ToString(GetData(SalesFeeTable.C_CEO_APPROVED_BY)); }
            set { SetData(SalesFeeTable.C_CEO_APPROVED_BY, value); }
        }
		
        public DateTime CeoApprovedDate
        {
            get { return Convert.ToDateTime(GetData(SalesFeeTable.C_CEO_APPROVED_DATE)); }
            set { SetData(SalesFeeTable.C_CEO_APPROVED_DATE, value); }
        }
		
        public string CeoApprovedRemark
        {
            get { return Convert.ToString(GetData(SalesFeeTable.C_CEO_APPROVED_REMARK)); }
            set { SetData(SalesFeeTable.C_CEO_APPROVED_REMARK, value); }
        }
		
        public decimal CeoApprovedAmount
        {
            get { return Convert.ToDecimal(GetData(SalesFeeTable.C_CEO_APPROVED_AMOUNT)); }
            set { SetData(SalesFeeTable.C_CEO_APPROVED_AMOUNT, value); }
        }
		
        public decimal UseAdvanceAmount
        {
            get { return Convert.ToDecimal(GetData(SalesFeeTable.C_USE_ADVANCE_AMOUNT)); }
            set { SetData(SalesFeeTable.C_USE_ADVANCE_AMOUNT, value); }
        }
		
        public decimal CeoApprovedSalesFee
        {
            get { return Convert.ToDecimal(GetData(SalesFeeTable.C_CEO_APPROVED_SALES_FEE)); }
            set { SetData(SalesFeeTable.C_CEO_APPROVED_SALES_FEE, value); }
        }
		
        public decimal ExpenseAmount
        {
            get { return Convert.ToDecimal(GetData(SalesFeeTable.C_EXPENSE_AMOUNT)); }
            set { SetData(SalesFeeTable.C_EXPENSE_AMOUNT, value); }
        }
		
        public DateTime FinPaidDate
        {
            get { return Convert.ToDateTime(GetData(SalesFeeTable.C_FIN_PAID_DATE)); }
            set { SetData(SalesFeeTable.C_FIN_PAID_DATE, value); }
        }
		
        public string FinPaymentBy
        {
            get { return Convert.ToString(GetData(SalesFeeTable.C_FIN_PAYMENT_BY)); }
            set { SetData(SalesFeeTable.C_FIN_PAYMENT_BY, value); }
        }
		
        public decimal FinPaidAmount
        {
            get { return Convert.ToDecimal(GetData(SalesFeeTable.C_FIN_PAID_AMOUNT)); }
            set { SetData(SalesFeeTable.C_FIN_PAID_AMOUNT, value); }
        }
		
        public string FinPaymentType
        {
            get { return Convert.ToString(GetData(SalesFeeTable.C_FIN_PAYMENT_TYPE)); }
            set { SetData(SalesFeeTable.C_FIN_PAYMENT_TYPE, value); }
        }

        public string FinOrderType
        {
            get { return Convert.ToString(GetData(SalesFeeTable.C_FIN_ORDER_TYPE)); }
            set { SetData(SalesFeeTable.C_FIN_ORDER_TYPE, value); }
        }
		
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(SalesFeeTable.C_CREATED_DATE)); }
            set { SetData(SalesFeeTable.C_CREATED_DATE, value); }
        }
		
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(SalesFeeTable.C_CREATED_BY)); }
            set { SetData(SalesFeeTable.C_CREATED_BY, value); }
        }
		
        public DateTime LastModifiedDate
        {
            get { return Convert.ToDateTime(GetData(SalesFeeTable.C_LAST_MODIFIED_DATE)); }
            set { SetData(SalesFeeTable.C_LAST_MODIFIED_DATE, value); }
        }
		
        public string LastModifiedBy
        {
            get { return Convert.ToString(GetData(SalesFeeTable.C_LAST_MODIFIED_BY)); }
            set { SetData(SalesFeeTable.C_LAST_MODIFIED_BY, value); }
        }
		
        public string Status
        {
            get { return Convert.ToString(GetData(SalesFeeTable.C_STATUS)); }
            set { SetData(SalesFeeTable.C_STATUS, value); }
        }

        public string Remark
        {
            get { return Convert.ToString(GetData(SalesFeeTable.C_REMARK)); }
            set { SetData(SalesFeeTable.C_REMARK, value); }
        }

		#endregion
	}
	
	
}	

